package zhtt01.config;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import zhtt01.service.OrganizationService;
import zhtt01.service.UserService;

/**
 * Created by zhtt on 2016/10/29.
 */
@SpringBootApplication
@Configuration
@ComponentScan(basePackages = { "zhtt01.dao","zhtt01.controller" })
//@Import(UserService.class)
@Import({UserService.class,OrganizationService.class})
public class ApplicationConfig01   extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(ApplicationConfig01.class);
    }

    public static void main(String[] args) throws Exception {
        SpringApplication.run(ApplicationConfig01.class, args);
    }
}
